import { Button, Col, Row, Timeline } from 'antd';
import React from 'react'
import AppDialog from '../../components/AppDialog'
import logisticsdata from './logisticsdata';

const ShowLogistics = ({ visible, onHide }) => {
  // 关闭
  const handleDialogClosed = () => {
    onHide()
  };

  return (visible ?
    <AppDialog
      title="修改地址"
      visible={visible}
      onClosed={handleDialogClosed}
    >
      <Timeline>
        {
          logisticsdata.map((item, index) => 
            <Timeline.Item key={index}>{item.context} {item.time}</Timeline.Item>
          )
        }
      </Timeline>
      <Row>
        <Col>
          <Button onClick={() => handleDialogClosed()}>关闭</Button>
        </Col>
      </Row>
    </AppDialog>
    : null
  )
}

export default ShowLogistics